home *** CD-ROM | disk | FTP | other *** search
/ PC Elektro 3 / PC-Elektro-3-cd1.bin / DesignWorks Professional Schematic Capture / DesignWorks4Setup.exe / Main / PCB Error Check.rfm < prev    next >
Encoding:
Text File  |  2004-10-16  |  4.8 KB  |  148 lines

  1. {
  2.   Error checking script for Generic PCB Design Kit
  3.   C. Dewhurst, May 13, 1996
  4.   ⌐1996-2000 Capilano Computing Systems Ltd.
  5.  
  6.   Error bit usage
  7.  
  8.     0    Bad name
  9.     1    Duplicate signal names
  10.     2    Unconnected signals
  11.     8    No package code
  12.     9    Multiple package codes
  13.     10    Duplicate pin numbers
  14.     11    Invalid pin numbers
  15.     12    No Part or Value
  16. }
  17. $NOTES
  18. PCB Error Check
  19.  
  20. This search script performs general checks for:
  21.  
  22.   - devices with no package code
  23.   - multiple package codes in same package
  24.   - duplicate pin numbers
  25.   - invalid pin numbers
  26.   - bad device names (non-alphanumeric)
  27.   - bad signal names (non-alphanumeric)
  28.   - duplicate signal names
  29.   - unconnected signals
  30.  
  31. These checks are not specific to any one PCB system and may not be appropriate
  32. for the design system you are using.
  33.  
  34. You can use Mark as OK to mark items so that they are not flagged in future.
  35.  
  36. Search text box: Not used
  37.  
  38. $ENDNOTES
  39. $PROGRESS $OFF
  40. {
  41.   Listing defaults
  42. }
  43. $CREATEREPORT($TEMPPATH$DESIGNNAME Errors)
  44. $SIGSOURCE(Ground)
  45. $SIGSOURCE(Plus5V) &Power
  46. $DESIGNSIGSOURCE &SigSources
  47. $AUTONUMBER(3)
  48. $BUSNAMEON(_)
  49. $SETVAR(_AnyErrors, 0)
  50. {
  51.   Issue a warning if any devices have no package code
  52. }
  53. $FIND $DEVICES $AND($ERRORBITOFF(8),$NOT(&Package))
  54. $SORT $DEVICES $DEVNAME
  55. $COMBDEVSON
  56. $DEVICES\$OBJECT $DEVLOC$NEWLINE\$OBJTITLE $DEVNAME - no Package attribute$NEWLINE\$ERRBIT 8$NEWLINE\$MESSAGE\Device $DEVNAME on page $PAGE has no Package attribute.
  57. $SETVAR(_AnyErrors, $PLUS(&_AnyErrors, $DEVCOUNT))
  58. {
  59.   Check for multiple package codes in same package
  60. }
  61. $FIND $DEVICES
  62. $SORT $DEVICES $DEVNAME
  63. $COMBDEVSON
  64. $FIND $NOCLEAR $DEVICES $GT($COUNTVALUES(&Package), 1) $ERRORBITOFF(9)
  65. $SORT $DEVICES $DEVNAME
  66. $COMBDEVSON
  67. $DEVICES\$OBJECT $DEVLOC$NEWLINE\$OBJTITLE $DEVNAME - inconsistent package codes$NEWLINE\$ERRBIT 9$NEWLINE\$MESSAGE Device $DEVNAME on page $PAGE has inconsistent package codes.
  68. $SETVAR(_AnyErrors, $PLUS(&_AnyErrors, $DEVCOUNT))
  69. {
  70.   Check for duplicate pin numbers
  71. }
  72. $FIND $DEVICES
  73. $SORT $DEVICES $DEVNAME
  74. $COMBDEVSON
  75. $DEVPINFORMAT $GT($SAMEPINCOUNT, 1)
  76. $FIND $SIGNALS
  77. $FIND $NOCLEAR $DEVICES $NONBLANK($MERGE$PINS) $ERRORBITOFF(10)
  78. $SORT $DEVICES $DEVNAME
  79. $COMBDEVSON
  80. $DEVICES\$OBJECT $DEVLOC$NEWLINE\$OBJTITLE $DEVNAME - duplicate pin #$NEWLINE\$ERRBIT 10$NEWLINE\$MESSAGE Device $DEVNAME on page $PAGE has duplicate pin numbers.
  81. $SETVAR(_AnyErrors, $PLUS(&_AnyErrors, $DEVCOUNT))
  82. {
  83.   Check for invalid pin numbers
  84. }
  85. $DEVPINFORMAT $REGEXP(\W?|.*\W.*, $PINNUM)
  86. $FIND $DEVICES $NONBLANK($PINS) $ERRORBITOFF(11)
  87. $SORT $DEVICES $DEVNAME
  88. $COMBDEVSON
  89. $DEVICES\$OBJECT $DEVLOC$NEWLINE\$OBJTITLE $DEVNAME - invalid pin #$NEWLINE\$ERRBIT 11$NEWLINE\$MESSAGE Device $DEVNAME on page $PAGE has invalid pin numbers.
  90. $SETVAR(_AnyErrors, $PLUS(&_AnyErrors, $DEVCOUNT))
  91. {
  92.   Check for invalid Part or Value
  93. }
  94. $FIND $DEVICES $AND($NOT($NONBLANK(&Value)), $NOT($NONBLANK(&Part))) $ERRORBITOFF(12)
  95. $SORT $DEVICES $DEVNAME
  96. $COMBDEVSON
  97. $DEVICES\$OBJECT $DEVLOC$NEWLINE\$OBJTITLE $DEVNAME - no Part or Value$NEWLINE\$ERRBIT 12$NEWLINE\$MESSAGE Device $DEVNAME on page $PAGE has neither Part or Value attributes specified.
  98. $SETVAR(_AnyErrors, $PLUS(&_AnyErrors, $DEVCOUNT))
  99. {
  100.   Check for bad device names
  101. }
  102. $FIND $DEVICES $NOT($REGEXP(\w+, $DEVNAME)) $ERRORBITOFF(0)
  103. $SORT $DEVICES $DEVNAME
  104. $COMBDEVSON
  105. $DEVICES\$OBJECT $DEVLOC$NEWLINE\$OBJTITLE $DEVNAME - invalid name$NEWLINE\$ERRBIT 0$NEWLINE\$MESSAGE Device $DEVNAME on page $PAGE has an invalid name.
  106. $SETVAR(_AnyErrors, $PLUS(&_AnyErrors, $DEVCOUNT))
  107. {
  108.   Check for bad signal names
  109. }
  110. $UNNAMEDSIGS(????)
  111. $FIND $SIGNALS $NOT($REGEXP(\w+, $SIGNAME)) $ERRORBITOFF(0)
  112. $SORT $SIGNALS $SIGNAME
  113. $FIND $DEVICES
  114. $SIGNALS\$OBJECT $SIGLOC$NEWLINE\$OBJTITLE $SIGNAME - invalid name$NEWLINE\$ERRBIT 0$NEWLINE\$MESSAGE Signal $SIGNAME on page(s) $PAGE has an invalid name.
  115. $SETVAR(_AnyErrors, $PLUS(&_AnyErrors, $SIGCOUNT))
  116. {
  117.   Check for duplicate signal names
  118. }
  119. $FIND $SIGNALS
  120. $COMBSIGSON
  121. $SORT $SIGNALS $SIGNAME
  122. $FIND $NOCLEAR $SIGNALS $COUNT(2) $ERRORBITOFF(1)
  123. $SORT $SIGNALS $SIGNAME
  124. $SIGNALS\$OBJECT $SIGLOC$NEWLINE\$OBJTITLE $SIGNAME - duplicate name$NEWLINE\$ERRBIT 1$NEWLINE\$MESSAGE Signals $SIGNAME on page(s) $PAGE have duplicate names.
  125. $SETVAR(_AnyErrors, $PLUS(&_AnyErrors, $SIGCOUNT))
  126. {
  127.   Check for unconnected signals
  128. }
  129. $FIND $DEVICES
  130. $FIND $SIGNALS $NUMPINS(1) $NOT($NUMPINS(2)) $ERRORBITOFF(2)
  131. $COMBSIGSOFF
  132. $SORT $SIGNALS $SIGNAME
  133. $SIGNALS\$OBJECT $SIGLOC$NEWLINE\$OBJTITLE $SIGNAME - unconnected$NEWLINE\$ERRBIT 2$NEWLINE\$MESSAGE Signals $SIGNAME on page(s) $PAGE has only one pin connection.
  134. $SETVAR(_AnyErrors, $PLUS(&_AnyErrors, $SIGCOUNT))
  135. {
  136.   Write out $TITLE line for ErrorScript window
  137. }
  138. \$TITLE
  139. &_AnyErrors errors found!  Error file is $TEMPPATH$DESIGNNAME Errors.
  140. {
  141.   Close the report output to the text file.
  142.   All subsequent output will go to ErrorScript as the file name.
  143. }
  144. $CLOSEREPORT
  145. {
  146.   Return report file name for ErrorScript
  147. }
  148. $TEMPPATH$DESIGNNAME Errors